package com.zhangpingyang.mybatisgenerator;

import com.zhangpingyang.mybatisgenerator.test.Teacher;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import java.lang.reflect.Method;
import java.util.Set;

import javax.annotation.PostConstruct;

@SpringBootApplication
public class MybatisGeneratorApplication {
    @Autowired
    private Set<Teacher> teachers;

    @PostConstruct
    public void test1() {
        for (Teacher teacher : teachers) {
            System.out.println(teacher.getClass().getName());
            Class<?> superclass = teacher.getClass().getSuperclass();
            Class<?>[] interfaces = superclass.getInterfaces();
            for (Class clazz : interfaces) {
                Method[] methods = clazz.getMethods();
                for (Method method : methods) {

                    System.out.println(method.getName());
                }
            }
        }
    }

    public static void main(String[] args) {
        SpringApplication.run(MybatisGeneratorApplication.class, args);
    }

}
